package com.example.democlient.network.serverpackets;

import java.nio.ByteBuffer;

import com.example.democlient.network.ServerConnection;
import com.example.democlient.network.packet.ServerPacket;

/**
 * 向服务器发送
 * @author Administrator
 *
 */
public class SM_USER_REGISTER_REQUEST extends ServerPacket
{

	private final String account;
	private final String password;
	private final String userName;
	private final String companyName;
	public SM_USER_REGISTER_REQUEST(String account,String password,String userName,String companyName)
	{
		super(0x01);
		this.account=account;
		this.password=password;
		this.userName=userName;
		this.companyName=companyName;
	}

	@Override
	protected void writeImpl(ServerConnection con, ByteBuffer buf)
	{
		writeS(buf,account);
		writeS(buf,password);
		writeS(buf,userName);
		writeS(buf,companyName);
	}
}
